#!/bin/sh
#ovs-vsctl add-br br-ex
#ovs-vsctl add-port br-ex veth1
ovn-nbctl create Logical_Router name=edge1 options:classis=d87aafca-8c3e-4681-a9c1-02db4715d0f9
ovn-nbctl ls-add outside
ovn-nbctl lrp-add edge1 router1-outside 02:ac:10:ff:00:02 192.168.166.111/16
ovn-nbctl lrp-set-gateway-chassis router1-outside d87aafca-8c3e-4681-a9c1-02db4715d0f9
ovn-nbctl lsp-add outside outside-router1
ovn-nbctl lsp-set-type outside-router1 router
ovn-nbctl lsp-set-addresses outside-router1 02:ac:10:ff:00:02
ovn-nbctl lsp-set-options outside-router1 router-port=router1-outside
#ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=physnet1:br-ex
ovn-nbctl lsp-add outside outside-localnet
ovn-nbctl lsp-set-addresses outside-localnet unknown
ovn-nbctl lsp-set-type outside-localnet localnet
ovn-nbctl lsp-set-options outside-localnet network_name=physnet1

#ovn-nbctl lr-nat-add edge1 snat 192.168.166.111 10.0.0.0/24
#ovn-nbctl lr-nat-add edge1 snat 192.168.166.111 10.1.0.0/24
#ovn-nbctl lr-route-add edge1 "0.0.0.0/0" 192.168.2.1
